import request from "@/apis/request";

export const findRanks = async (searchForm, currentPage, pageSize) =>{
    return await request.get('/api/rank/find',
    {
        params:{
            rankNo:searchForm.rankNo,
            rankArrangement:searchForm.rankArrangement,
            rankArrangementName:searchForm.rankArrangementName,
            salaryCap:searchForm.salaryCap,
            salaryMinimum:searchForm.salaryMinimum,
            currentPage:currentPage,
            pageSize:pageSize
        }
    })
}
export const findRankById = async (id) =>{
    return await request.get('/api/rank/findById',{params:{rankId:id}})
}
export const addRank = async (form) =>{
    return await request.post('/api/rank/insert',form)
}
export const updateRank = async (form) =>{
    return await request.put('/api/rank/update',form)
}
export const deleteRank = async (id) =>{
    return await request.delete('/api/rank/delete',{data:id})
}